package com.hc.server.db;

// Generated 2011-12-25 17:23:27 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Mporder generated by hbm2java
 */
@Entity
@Table(name = "mporder", catalog = "mpi")
public class Mporder implements java.io.Serializable {

	private Integer id;
	private String user;
	private String phone;
	private int amount;
	private String des;
	private Date createTime;
	private Date invalidTime;
	private Date settleTime;
	private int status;
	private String remark;
	private Set<Ordermap> ordermaps = new HashSet<Ordermap>(0);

	public Mporder() {
	}

	public Mporder(String user, String phone, int amount, String des,
			Date createTime, Date invalidTime, int status) {
		this.user = user;
		this.phone = phone;
		this.amount = amount;
		this.des = des;
		this.createTime = createTime;
		this.invalidTime = invalidTime;
		this.status = status;
	}

	public Mporder(String user, String phone, int amount, String des,
			Date createTime, Date invalidTime, Date settleTime, int status,
			String remark, Set<Ordermap> ordermaps) {
		this.user = user;
		this.phone = phone;
		this.amount = amount;
		this.des = des;
		this.createTime = createTime;
		this.invalidTime = invalidTime;
		this.settleTime = settleTime;
		this.status = status;
		this.remark = remark;
		this.ordermaps = ordermaps;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "user", nullable = false, length = 45)
	public String getUser() {
		return this.user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	@Column(name = "phone", nullable = false, length = 11)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "amount", nullable = false)
	public int getAmount() {
		return this.amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	@Column(name = "des", nullable = false, length = 1024)
	public String getDes() {
		return this.des;
	}

	public void setDes(String des) {
		this.des = des;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "createTime", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "invalidTime", nullable = false, length = 19)
	public Date getInvalidTime() {
		return this.invalidTime;
	}

	public void setInvalidTime(Date invalidTime) {
		this.invalidTime = invalidTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "settleTime", length = 10)
	public Date getSettleTime() {
		return this.settleTime;
	}

	public void setSettleTime(Date settleTime) {
		this.settleTime = settleTime;
	}

	@Column(name = "status", nullable = false)
	public int getStatus() {
		return this.status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Column(name = "remark", length = 512)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "mporder")
	public Set<Ordermap> getOrdermaps() {
		return this.ordermaps;
	}

	public void setOrdermaps(Set<Ordermap> ordermaps) {
		this.ordermaps = ordermaps;
	}

}
